{ "gl-texture-rect", GDK_DEBUG_GL_TEXTURE_RECT },
{ "gl-legacy", GDK_DEBUG_GL_LEGACY },
{ "gl-gles", GDK_DEBUG_GL_GLES },
+ { "gl-debug", GDK_DEBUG_GL_DEBUG },
{ "vulkan-disable", GDK_DEBUG_VULKAN_DISABLE },
{ "vulkan-validate", GDK_DEBUG_VULKAN_VALIDATE }
};
guint has_gl_framebuffer_blit : 1;
guint has_frame_terminator : 1;
guint has_khr_debug : 1;
+ guint use_khr_debug : 1;
guint has_unpack_subimage : 1;
guint has_debug_output : 1;
guint extensions_checked : 1;
{
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
- if (priv->has_khr_debug)
+ if (priv->use_khr_debug)
glPushDebugGroupKHR (GL_DEBUG_SOURCE_APPLICATION, 0, -1, message);
}
gchar *message;
va_list args;
- if (priv->has_khr_debug)
+ if (priv->use_khr_debug)
{
va_start (args, format);
message = g_strdup_vprintf (format, args);
{
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
- if (priv->has_khr_debug)
+ if (priv->use_khr_debug)
glPopDebugGroupKHR ();
}
{
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
- if (priv->has_khr_debug)
+ if (priv->use_khr_debug)
glObjectLabel (identifier, name, -1, label);
}
gchar *message;
va_list args;
- if (priv->has_khr_debug)
+ if (priv->use_khr_debug)
{
va_start (args, format);
message = g_strdup_vprintf (format, args);
display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context));
+ if (priv->has_khr_debug && GDK_DISPLAY_DEBUG_CHECK (display, GL_DEBUG))
+ priv->use_khr_debug = TRUE;
if (!priv->use_es && GDK_DISPLAY_DEBUG_CHECK (display, GL_TEXTURE_RECT))
priv->use_texture_rectangle = TRUE;
else if (has_npot)
GDK_DEBUG_GL_TEXTURE_RECT = 1 << 14,
GDK_DEBUG_GL_LEGACY = 1 << 15,
GDK_DEBUG_GL_GLES = 1 << 16,
- GDK_DEBUG_VULKAN_DISABLE = 1 << 17,
- GDK_DEBUG_VULKAN_VALIDATE = 1 << 18
+ GDK_DEBUG_GL_DEBUG = 1 << 17,
+ GDK_DEBUG_VULKAN_DISABLE = 1 << 18,
+ GDK_DEBUG_VULKAN_VALIDATE = 1 << 19
} GdkDebugFlags;
extern guint _gdk_debug_flags;